package main

type treeNode struct {
	start int
	end   int
}
type MyCalendar struct {
	m map[treeNode]struct{}
}

func Constructor() MyCalendar {
	return MyCalendar{
		m: make(map[treeNode]struct{}),
	}
}

func (this *MyCalendar) Book(start int, end int) bool {
	node := treeNode{
		start: start,
		end:   end,
	}

	_, ok := this.m[node]
	if ok {
		return false
	}

	this.m[node] = struct{}{}
	return true
}
